

using System;
using System.Collections.Generic;
using System.Text;
using EntityLayer;
using System.Data;
using DataAccessLayer;

namespace DataLayer
{
	public class datErrorMessageMultilanguageSettings
	{
		public datErrorMessageMultilanguageSettings()
		{
		}
		
		#region  Code Factory Generated Methods
        public void DeleteErrorMessageMultilanguageSettingsByErrorMessageMultilanguageSettingId(entErrorMessageMultilanguageSettings parEntErrorMessageMultilanguageSettings, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pErrorMessageMultilanguageSettingId", parEntErrorMessageMultilanguageSettings.ErrorMessageMultilanguageSettingId);
            parDbConnector.ExecuteNonQuery("DeleteErrorMessageMultilanguageSettingsByErrorMessageMultilanguageSettingId", insDbParamCollection);
        }
        public void InsertErrorMessageMultilanguageSettings(entErrorMessageMultilanguageSettings parEntErrorMessageMultilanguageSettings, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pErrorMessageId", parEntErrorMessageMultilanguageSettings.ErrorMessageId);
            insDbParamCollection.Add("@pLanguageId", parEntErrorMessageMultilanguageSettings.LanguageId);
            insDbParamCollection.Add("@pErrorMessageText", parEntErrorMessageMultilanguageSettings.ErrorMessageText);
            insDbParamCollection.AddOutput("@pErrorMessageMultilanguageSettingId", DbType.Int32);
            parDbConnector.ExecuteNonQuery("InsertErrorMessageMultilanguageSettings", insDbParamCollection);
            parEntErrorMessageMultilanguageSettings.ErrorMessageMultilanguageSettingId = Convert.ToInt32(insDbParamCollection.GetOutPutParameter().Value);
        }
        public void UpdateErrorMessageMultilanguageSettingsByErrorMessageMultilanguageSettingId(entErrorMessageMultilanguageSettings parEntErrorMessageMultilanguageSettings, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pErrorMessageMultilanguageSettingId", parEntErrorMessageMultilanguageSettings.ErrorMessageMultilanguageSettingId);

            insDbParamCollection.Add("@pErrorMessageId", parEntErrorMessageMultilanguageSettings.ErrorMessageId);
            insDbParamCollection.Add("@pLanguageId", parEntErrorMessageMultilanguageSettings.LanguageId);
            insDbParamCollection.Add("@pErrorMessageText", parEntErrorMessageMultilanguageSettings.ErrorMessageText);
            parDbConnector.ExecuteNonQuery("UpdateErrorMessageMultilanguageSettingsByErrorMessageMultilanguageSettingId", insDbParamCollection);
        }
        public DataTable SelectErrorMessageMultilanguageSettings(DbConnector parDbConnector)
        {

            return parDbConnector.ExecuteDataTable("SelectErrorMessageMultilanguageSettings", null);
        }
       
		#endregion

        public DataTable SelectErrorMessageMultilanguageSettingsByErrorMessageId(entErrorMessageMultilanguageSettings parEntErrorMessageMultilanguageSettings, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pErrorMessageId", parEntErrorMessageMultilanguageSettings.ErrorMessageId);
            return parDbConnector.ExecuteDataTable("SelectErrorMessageMultilanguageSettingsByErrorMessageId", insDbParamCollection);
        }
	}
}